# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: Magnus Sandin <magnus.sandin@gmail.com>
pkgname=py3-pychromecast
pkgver=14.0.1
pkgrel=1
pkgdesc="Python module to talk to Google Chromecast"
url="https://github.com/home-assistant-libs/pychromecast"
arch="noarch"
license="MIT"
depends="
	py3-casttube
	py3-protobuf
	py3-zeroconf
	python3
	"
makedepends="
	py3-build
	py3-gpep517
	py3-setuptools
	py3-wheel
	"
subpackages="$pkgname-pyc"
source="https://pypi.python.org/packages/source/P/PyChromecast/PyChromecast-$pkgver.tar.gz"
options="!check" # No tests
builddir="$srcdir/PyChromecast-$pkgver"

provides="py3-chromecast=$pkgver-r$pkgrel" # Backwards compatibility
replaces="py3-chromecast" # Backwards compatibility

build() {
	gpep517 build-wheel \
		--wheel-dir .dist \
		--output-fd 3 3>&1 >&2
}

package() {
	gpep517 install-wheel --destdir "$pkgdir" \
		.dist/*.whl
}

sha512sums="
72119e27be49128d57a9354aaebd2a5711f3da0ad2e7ca07863107382061d9398c95c901ac33ea2a1c45687b2cbef32dfdba228be99e1acdef79ce133510fb4e  PyChromecast-14.0.1.tar.gz
"
